

global.Schedule= Utils.newList()

function waitRunable(/**@type {Number}*/time,/**@type {Function}*/runable){
    /**@type {Number}*/
    this.time=time
    /**@type {Function}*/
    this.runable=runable
    this.finish=false
    global.Schedule.push(this)
}

waitRunable.prototype.tick = function(){
    this.time--
    if (this.time<=0) {
        this.runable()
        this.finish=true
    }
}